/**
 *@program: getx_simple_code
 *@description:
 *@author: Ming
 *@create: 2023-12-27 14:49
 *@version v1.0
 */
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getx_simple_code/common/routes/app_pages.dart';
import 'package:getx_simple_code/common/routes/app_routes.dart';

class HomeView extends StatelessWidget {
  const HomeView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("首页"),
      ),
      body: ListView(
        children: [
          ListTile(
            title: Text("基本功能展示"),
            subtitle: Text('Get.toNamed("/baseFun")'),
            onTap: () => Get.toNamed("/baseFun"),
          ),
          Divider(),
          ListTile(
            title: Text("国际化"),
            subtitle: Text('Get.toNamed("/lang")'),
            onTap: () => Get.toNamed(AppRoutes.Lang),
          ),
          Divider(),
          ListTile(
            title: Text("路由展示"),
            subtitle: Text('Get.toNamed("/router")'),
            onTap: () => Get.toNamed("/router"),
          ),
          Divider(),
          ListTile(
            title: Text("响应式状态管理-obx"),
            subtitle: Text('Get.toNamed("/obx")'),
            onTap: () => Get.toNamed("/obx"),
          ),
          Divider(),
          ListTile(
            title: Text("响应式状态管理-GetBuilder"),
            subtitle: Text('Get.toNamed("/getxVC")'),
            onTap: () => Get.toNamed("/getxVC"),
          ),
          Divider(),
          ListTile(
            title: Text("响应式状态管理-多个依赖"),
            subtitle: Text('Get.toNamed("/getxmVC")'),
            onTap: () => Get.toNamed("/getxmVC"),
          ),
          Divider(),
          ListTile(
            title: Text("Dio"),
            subtitle: Text('Get.toNamed("/dioVC")'),
            onTap: () => Get.toNamed(AppRoutes.Diovc),
          ),
          Divider(),
          ListTile(
            title: Text("刷新"),
            subtitle: Text('Get.toNamed("/refreshPage")'),
            onTap: () => Get.toNamed(AppRoutes.RefreshPage),
          ),
          Divider(),
        ],
      ),
    );
  }
}